package constant.milk.toilet.database;

import java.util.HashMap;

import android.content.Context;

public class DbInsertQuery
{
	private Context context;
	private DbAdapter db;
	
	public DbInsertQuery(Context context, DbAdapter db)
	{
		this.context = context;
		this.db = db;
	}
	
	public void setBeginTansaction() throws Exception
	{
		db.beginTansaction(context);
	}
	
	public void setSuccessful() throws Exception
	{
		db.setTransactionSuccessful();
	}
	
	public void setEndTansaction() throws Exception
	{
		db.endTransaction(context);
	}
	
	public void insertTimer(HashMap<String, String> map) throws Exception
	{
		db.insert(context, map, TableName.TIMER_LIST);
	}
	
	public void insertSticker(HashMap<String, String> map) throws Exception
	{
		db.insert(context, map, TableName.STICKER_LIST);
	}
}
